<template>
  <el-table
    :data="reset"
    border
    @selection-change="handleSelectionChange"
    :header-cell-style="{background:'#f4f4f4'}"
    style="width: 100%">
    <el-table-column
      type="selection"
      width="50">
    </el-table-column>
    <el-table-column
      prop="RequisitionNo"
      align="center"
      label="领料单"
      width="160">
    </el-table-column>
    <el-table-column
      prop="OrderBagId"
      align="center"
      label="工单"
      width="100">
    </el-table-column>
    <el-table-column
      prop="linebody"
      align="center"
      label="线体">
    </el-table-column>
    <el-table-column
      prop="workshop"
      align="center"
      label="车间">
    </el-table-column>
    <el-table-column
      prop="name"
      label="预料开工时间"
      align="center">
    </el-table-column>
    <el-table-column
      prop="address"
      align="center"
      label="剩余时长">
    </el-table-column>
    <el-table-column
      prop="StatusFormat"
      align="center"
      label="状态"
      width="110">
    </el-table-column>
    <el-table-column
      prop="RequisitionTypeFormat"
      align="center"
      label="类型">
    </el-table-column>
    <el-table-column
      prop="CreateBy"
      align="center"
      label="创建人"
      width="110">
    </el-table-column>
    <el-table-column
      prop="CreateTime"
      :show-overflow-tooltip="true"
      align="center"
      label="创建时间">
    </el-table-column>
  </el-table>
</template>

<script>
  export default {
    props: {
      reset: {
        type: Array
      }
    },
    data() {
      return {
        
      }
    },
    methods:{
      handleSelectionChange(val){
        this.$emit('changeData',val)
        let listId=[]
        val.forEach(el => {
            listId.push(el.RequisitionID)
        });
        this.$emit('getId',listId) 
      }
    }
  }
</script>